public class TestJoin implements Runnable{
    @Override
    public void run() {
        for (int i = 0; i < 200; i++) {
            System.out.println("join... "+i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
        TestJoin test = new TestJoin();
        Thread thread = new Thread(test);
        thread.start();
        for (int i = 0; i < 200; i++) {
            if(i==100){
                thread.join();
            }
            System.out.println("main... "+i);
        }
    }
}
